package de.andreavicentini.teatralia.pages.repertoire;

import org.magiclabs.htmlx.Area;
import org.magiclabs.htmlx.PropertiesTextStructure;
import org.magiclabs.htmlx.TextStructure;

import de.andreavicentini.teatralia.generate.Repertoire;
import de.andreavicentini.teatralia.pages.TeatraliaPage;

public class RepertoirePage extends TeatraliaPage {
	
	private final AuthorsModel authors;
	private final PlaysModel plays;

	public enum Keys implements TextStructure.TextKey {
		title, subtitle, intro, title_authors, title_plays
		;
	}
	
	public RepertoirePage(Area area, AuthorsModel authors, PlaysModel plays) {
		super(new Repertoire(), Keys.title, Keys.subtitle, area.getLayout(), area, new PropertiesTextStructure(RepertoirePage.class, "repertoire"));
		this.authors = authors;
		this.plays = plays;
	}
	
	public Iterable<IPlay> iteratePlays() {
		return this.plays;
	}
	
	public Iterable<Author> iterateAuthors() {
		return this.authors;
	}

}
